// 封装人气推荐业务逻辑
import { getHotAPI } from '@/apis/home.js'
import { onMounted, ref } from 'vue'

export function useHot() {
  // 获取人气推荐
  const hotList = ref([])
  const getHotList = async () => {
    const res = await getHotAPI()
    hotList.value = res.result
  }
  onMounted(() => getHotList())

  return {
    hotList
  }
}
